The charging of a quantum box, coupled to a lead by tunneling through a single resonant level, is studied near the degeneracy points of the Coulomb blockade. Combining Wilson's numerical renormalization-group method with perturbative scaling approaches, the corresponding low-energy Hamiltonian is solved for arbitrary temperatures, gate voltages, tunneling rates, and energies of the impurity level. Similar to the case of a weak tunnel barrier, the shape of the charge step is governed at low temperatures by the non-Fermi-liquid fixed point of the two-channel Kondo effect. However, the associated Kondo temperature TK is strongly modified. Most notably, TK is proportional to the width of the level if the transmission through the impurity is close to unity at the Fermi energy, and is no longer exponentially small in one over the tunneling matrix element. Focusing on a particle-hole symmetric level, the two-channel Kondo effect is found to be robust against the inclusion of an on-site repulsion on the level. For a large on-site repulsion and a large asymmetry in the tunneling rates to box and to the lead, there is a sequence of Kondo effects: first the local magnetic moment that forms on the level undergoes single-channel screening, followed by two-channel overscreening of the charge fluctuations inside the box.